home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / monochrome.swf / scripts / frame_25 / PlaceObject2_497_264 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2005-08-26  |  803 b   |  38 lines

  1. onClipEvent(enterFrame){
  2.    if(_name != "shipD")
  3.    {
  4.       _Y = _Y + yspeed;
  5.       _X = _X + xspeed;
  6.       xspeed *= 0.97;
  7.       if(_X < -100 || _X > 650 || _Y < -100 || _Y > 500 || _root.rem == true)
  8.       {
  9.          removeMovieClip(this);
  10.       }
  11.       var i = 0;
  12.       while(i <= 20)
  13.       {
  14.          if(sh.harea.hitTest(_root["hmn" + i]))
  15.          {
  16.             life -= _root["hmn" + i].dmg;
  17.             sh.play();
  18.             removeMovieClip(_root["hmn" + i]);
  19.          }
  20.          i++;
  21.       }
  22.       if(_root.ship.sh.hitTest(sh.harea))
  23.       {
  24.          play();
  25.          _root.ship.play();
  26.       }
  27.       if(life <= 0)
  28.       {
  29.          play();
  30.       }
  31.       yy = random(30);
  32.       if(yy == 0)
  33.       {
  34.          xspeed = (Math.random() - 0.5) * 20;
  35.       }
  36.    }
  37. }
  38.